home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2005 Utilities / CHIP Utilities 2005.7z / CHIP Utilities 2005.iso / images / freesco.igz / freesco.img / router / www / cgi / example < prev   
Encoding:
Text File  |  2002-03-13  |  512 b   |  21 lines

  1. #!/bin/sh
  2. D=`date`
  3. C=`echo $HTTP_REFERER | sed 's.\/\/.@.;s.\/.:82.;s.@.\/\/.'`
  4. cat <<-!
  5.     Content-type: text/html
  6.  
  7.     <html><body bgcolor=#FFFFE0><center>
  8.     <table border=1><tr><td>
  9.     <font face=system><blockquote>
  10.     <br>FREESCO $D - cgi script example<p>
  11. !
  12. echo "'cgi/example' was called with parameter - '$QUERY_STRING'<p>"
  13. cat <<-!
  14.     <a href=$C>Click here for Control Panel $C</a><p>
  15.     Source of this cgi script:<pre>
  16. !
  17. sed 's/</\&\lt;/g;s/>/\&\gt;/g' example
  18. cat <<-!
  19.     </pre></td></tr></table></body></html>
  20. !
  21. # End